using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using DG.Tweening;

public class LightBoom : MonoBehaviour
{
    // Start is called before the first frame update
    private bool trigger;
    private void Awake()
    {
        Destroy(this.gameObject,1.5f);
    }

    // Update is called once per frame
    void Update()
    {
        if (this.gameObject)
        {
            transform.DOLocalRotate(new Vector3(0f, 360 * 20f, 0f), 1.5f);
            transform.DOScale(new Vector3(8, 8, 8), 1f);
        }

        if (transform.localScale.x>3&&!trigger)
        {
            SkillManager.Instance.CalucateDamage(this.transform.position,SkillManager.Instance.SkillListArcher.items[0].damage,SkillManager.Instance.SkillListArcher.items[0].AoeRange);
            trigger = true;
        }
        
        
    }
}
